package com.gitee.dolt.core.hutool;

import cn.hutool.core.convert.Converter;
import cn.hutool.core.util.StrUtil;
import com.gitee.dolt.model.RemoteData;

public class RemoteDataConvert implements Converter<RemoteData> {
    @Override
    public RemoteData convert(Object o, RemoteData remoteData) throws IllegalArgumentException {
        if (StrUtil.isEmptyIfStr(o)) {
            return null;
        }
        if (o instanceof RemoteData) {
            return (RemoteData) o;
        }
        return new RemoteData(o);
    }
}
